import { get,post } from "../../utils/request"
import { newstype } from "./type";
// 新闻列表
export const getnews = (data:object) =>{ 
    return get('news/list',data);
}
// 新闻添加
export const newsadd = (data:newstype) =>{ 
    return post('news/add',data);
}
// 单删
export const newsdelete = (id:number) =>{ 
    return get('news/delete',{id:id});
}
// 多删
export const newsdeleteall = (ids:[]) =>{ 
    return post('news/deleteall',{ids});
}
// 单条
export const newsonelist = (id:number) =>{ 
    return get('news/get',{id});
}
// 类型
export const newstypelist = () =>{ 
    return get('newstype/list',{psize:10});
}

